package com.lagou.service.impl;

import com.lagou.dao.ResumeDao;
import com.lagou.pojo.Resume;
import com.lagou.service.IResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServiceImpl implements IResumeService {
	
	@Autowired
	ResumeDao resumeDao;

	@Override
	public List<Resume> getAll() {
		return resumeDao.findAll();
	}

	
	
	@Override
	public void delete(String id) {
		resumeDao.deleteById(Long.parseLong(id));
		
	}

	@Override
	public Resume get(String id) {
		return resumeDao.getOne(Long.parseLong(id));
	}

	@Override
	public void update(Resume resume) {
		resumeDao.save(resume);
		
	}

	@Override
	public void save(Resume resume) {
		resumeDao.save(resume);
	}

}
